package com.example.hospital.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 
 * @TableName medicalrecord
 */
@TableName(value ="medicalrecord")
public class Medicalrecord implements Serializable {
    /**
     * 
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Integer recordId;

    /**
     * 
     */
    @TableField(value = "patient_id")
    private Integer patientId;

    /**
     * 
     */
    @TableField(value = "doctor_id")
    private Integer doctorId;

    /**
     * 
     */
    @TableField(value = "visit_date")
    private LocalDate visitDate;

    /**
     * 
     */
    @TableField(value = "diagnosis")
    private String diagnosis;

    /**
     * 
     */
    @TableField(value = "treatment")
    private String treatment;

    /**
     * 就诊类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 过敏史
     */
    @TableField(value = "allergic_history")
    private String allergicHistory;

    /**
     * 现病史
     */
    @TableField(value = "illness_history")
    private String illnessHistory;

    /**
     * 是否诊断完成
     */
    @TableField(value = "is_complete")
    private Integer isComplete;

    /**
     * 发病日期
     */
    @TableField(value = "onset_date")
    private LocalDate onsetDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getRecordId() {
        return recordId;
    }

    /**
     * 
     */
    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    /**
     * 
     */
    public Integer getPatientId() {
        return patientId;
    }

    /**
     * 
     */
    public void setPatientId(Integer patientId) {
        this.patientId = patientId;
    }

    /**
     * 
     */
    public Integer getDoctorId() {
        return doctorId;
    }

    /**
     * 
     */
    public void setDoctorId(Integer doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * 
     */
    public LocalDate getVisitDate() {
        return visitDate;
    }

    /**
     * 
     */
    public void setVisitDate(LocalDate visitDate) {
        this.visitDate = visitDate;
    }

    /**
     * 
     */
    public String getDiagnosis() {
        return diagnosis;
    }

    /**
     * 
     */
    public void setDiagnosis(String diagnosis) {
        this.diagnosis = diagnosis;
    }

    /**
     * 
     */
    public String getTreatment() {
        return treatment;
    }

    /**
     * 
     */
    public void setTreatment(String treatment) {
        this.treatment = treatment;
    }

    /**
     * 就诊类型
     */
    public String getType() {
        return type;
    }

    /**
     * 就诊类型
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 过敏史
     */
    public String getAllergicHistory() {
        return allergicHistory;
    }

    /**
     * 过敏史
     */
    public void setAllergicHistory(String allergicHistory) {
        this.allergicHistory = allergicHistory;
    }

    /**
     * 现病史
     */
    public String getIllnessHistory() {
        return illnessHistory;
    }

    /**
     * 现病史
     */
    public void setIllnessHistory(String illnessHistory) {
        this.illnessHistory = illnessHistory;
    }

    /**
     * 是否诊断完成
     */
    public Integer getIsComplete() {
        return isComplete;
    }

    /**
     * 是否诊断完成
     */
    public void setIsComplete(Integer isComplete) {
        this.isComplete = isComplete;
    }

    /**
     * 发病日期
     */
    public LocalDate getOnsetDate() {
        return onsetDate;
    }

    /**
     * 发病日期
     */
    public void setOnsetDate(LocalDate onsetDate) {
        this.onsetDate = onsetDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Medicalrecord other = (Medicalrecord) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()))
            && (this.getVisitDate() == null ? other.getVisitDate() == null : this.getVisitDate().equals(other.getVisitDate()))
            && (this.getDiagnosis() == null ? other.getDiagnosis() == null : this.getDiagnosis().equals(other.getDiagnosis()))
            && (this.getTreatment() == null ? other.getTreatment() == null : this.getTreatment().equals(other.getTreatment()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getAllergicHistory() == null ? other.getAllergicHistory() == null : this.getAllergicHistory().equals(other.getAllergicHistory()))
            && (this.getIllnessHistory() == null ? other.getIllnessHistory() == null : this.getIllnessHistory().equals(other.getIllnessHistory()))
            && (this.getIsComplete() == null ? other.getIsComplete() == null : this.getIsComplete().equals(other.getIsComplete()))
            && (this.getOnsetDate() == null ? other.getOnsetDate() == null : this.getOnsetDate().equals(other.getOnsetDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        result = prime * result + ((getVisitDate() == null) ? 0 : getVisitDate().hashCode());
        result = prime * result + ((getDiagnosis() == null) ? 0 : getDiagnosis().hashCode());
        result = prime * result + ((getTreatment() == null) ? 0 : getTreatment().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getAllergicHistory() == null) ? 0 : getAllergicHistory().hashCode());
        result = prime * result + ((getIllnessHistory() == null) ? 0 : getIllnessHistory().hashCode());
        result = prime * result + ((getIsComplete() == null) ? 0 : getIsComplete().hashCode());
        result = prime * result + ((getOnsetDate() == null) ? 0 : getOnsetDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", patientId=").append(patientId);
        sb.append(", doctorId=").append(doctorId);
        sb.append(", visitDate=").append(visitDate);
        sb.append(", diagnosis=").append(diagnosis);
        sb.append(", treatment=").append(treatment);
        sb.append(", type=").append(type);
        sb.append(", allergicHistory=").append(allergicHistory);
        sb.append(", illnessHistory=").append(illnessHistory);
        sb.append(", isComplete=").append(isComplete);
        sb.append(", onsetDate=").append(onsetDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}